Optimal. Leaf size=207 \[ -\frac {(5 B-2 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^{5/2} d}+\frac {(115 B-43 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {(B-C) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}-\frac {(15 B-7 C) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(35 B-11 C) \sin (c+d x)}{16 a^2 d \sqrt {a+a \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.46, antiderivative size = 207, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 7, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {4157, 4105,
4107, 4005, 3859, 209, 3880} \begin {gather*} -\frac {(5 B-2 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{a^{5/2} d}+\frac {(115 B-43 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(35 B-11 C) \sin (c+d x)}{16 a^2 d \sqrt {a \sec (c+d x)+a}}-\frac {(15 B-7 C) \sin (c+d x)}{16 a d (a \sec (c+d x)+a)^{3/2}}-\frac {(B-C) \sin (c+d x)}{4 d (a \sec (c+d x)+a)^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3859
Rule 3880
Rule 4005
Rule 4105
Rule 4107
Rule 4157
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{5/2}} \, dx &=\int \frac {\cos (c+d x) (B+C \sec (c+d x))}{(a+a \sec (c+d x))^{5/2}} \, dx\\ &=-\frac {(B-C) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {\int \frac {\cos (c+d x) \left (a (5 B-C)-\frac {5}{2} a (B-C) \sec (c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx}{4 a^2}\\ &=-\frac {(B-C) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}-\frac {(15 B-7 C) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {\int \frac {\cos (c+d x) \left (\frac {1}{2} a^2 (35 B-11 C)-\frac {3}{4} a^2 (15 B-7 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{8 a^4}\\ &=-\frac {(B-C) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}-\frac {(15 B-7 C) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(35 B-11 C) \sin (c+d x)}{16 a^2 d \sqrt {a+a \sec (c+d x)}}+\frac {\int \frac {-4 a^3 (5 B-2 C)+\frac {1}{4} a^3 (35 B-11 C) \sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx}{8 a^5}\\ &=-\frac {(B-C) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}-\frac {(15 B-7 C) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(35 B-11 C) \sin (c+d x)}{16 a^2 d \sqrt {a+a \sec (c+d x)}}+\frac {(115 B-43 C) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx}{32 a^2}-\frac {(5 B-2 C) \int \sqrt {a+a \sec (c+d x)} \, dx}{2 a^3}\\ &=-\frac {(B-C) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}-\frac {(15 B-7 C) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(35 B-11 C) \sin (c+d x)}{16 a^2 d \sqrt {a+a \sec (c+d x)}}-\frac {(115 B-43 C) \text {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{16 a^2 d}+\frac {(5 B-2 C) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^2 d}\\ &=-\frac {(5 B-2 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^{5/2} d}+\frac {(115 B-43 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {(B-C) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}-\frac {(15 B-7 C) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(35 B-11 C) \sin (c+d x)}{16 a^2 d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 27.19, size = 12012, normalized size = 58.03 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1064\) vs.
\(2(178)=356\).
time = 25.89, size = 1065, normalized size = 5.14
method | result | size |
default | \(\text {Expression too large to display}\) | \(1065\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 15.49, size = 739, normalized size = 3.57 \begin {gather*} \left [\frac {\sqrt {2} {\left ({\left (115 \, B - 43 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (115 \, B - 43 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (115 \, B - 43 \, C\right )} \cos \left (d x + c\right ) + 115 \, B - 43 \, C\right )} \sqrt {-a} \log \left (-\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, a \cos \left (d x + c\right )^{2} - 2 \, a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 32 \, {\left ({\left (5 \, B - 2 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (5 \, B - 2 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (5 \, B - 2 \, C\right )} \cos \left (d x + c\right ) + 5 \, B - 2 \, C\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} + 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 4 \, {\left (16 \, B \cos \left (d x + c\right )^{3} + 5 \, {\left (11 \, B - 3 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (35 \, B - 11 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{64 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}}, -\frac {\sqrt {2} {\left ({\left (115 \, B - 43 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (115 \, B - 43 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (115 \, B - 43 \, C\right )} \cos \left (d x + c\right ) + 115 \, B - 43 \, C\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - 32 \, {\left ({\left (5 \, B - 2 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (5 \, B - 2 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (5 \, B - 2 \, C\right )} \cos \left (d x + c\right ) + 5 \, B - 2 \, C\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - 2 \, {\left (16 \, B \cos \left (d x + c\right )^{3} + 5 \, {\left (11 \, B - 3 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (35 \, B - 11 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{32 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (B + C \sec {\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{\left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{\frac {5}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 464 vs.
\(2 (178) = 356\).
time = 2.27, size = 464, normalized size = 2.24 \begin {gather*} -\frac {2 \, \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} {\left (\frac {2 \, \sqrt {2} {\left (B a^{5} - C a^{5}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}{a^{8} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} - \frac {\sqrt {2} {\left (21 \, B a^{5} - 13 \, C a^{5}\right )}}{a^{8} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {\sqrt {2} {\left (115 \, B - 43 \, C\right )} \log \left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2}\right )}{\sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} - \frac {32 \, {\left (5 \, B - 2 \, C\right )} \log \left (\frac {{\left | -562949953421312 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - 1125899906842624 \, \sqrt {2} {\left | a \right |} + 1688849860263936 \, a \right |}}{{\left | -562949953421312 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + 1125899906842624 \, \sqrt {2} {\left | a \right |} + 1688849860263936 \, a \right |}}\right )}{\sqrt {-a} a {\left | a \right |} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} - \frac {128 \, \sqrt {2} {\left (3 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} B - B a\right )}}{{\left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} - 6 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a + a^{2}\right )} \sqrt {-a} a \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}}{64 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^2\,\left (\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________